using UnityEngine;

public class TGS_Camera_Script : MonoBehaviour
{
    [Header("摄像机跟随对象")]
    public Transform target;
    
    // 方向向量
    private Vector3 direction;
    
    void Start()
    {
        direction = target.position - transform.position;
    }

    private void Update()
    {
        transform.position = target.position - direction;
    }
}
